﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Edit_empresa.aspx.cs" Inherits="Empresa_Edit_empresa" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <title>Editar Empresa</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h1>Editar Empresa</h1><br />
    <a href="Adm_empresa.aspx">Consultar Empresas</a>
 <form id="form1" runat="server">
                
                <asp:ScriptManager ID="ScriptManager1" runat="server" />
 <asp:Panel ID="PanelEditar" runat="server">
 
                 <div>
                
                
                  
                <br />
                
                <p>
                    Los campos marcados con (*) son obligatorios</p>
                     <p>
                         <asp:Button ID="ButtonModificar" runat="server" CausesValidation="False" 
                             Text="Modificar" CssClass="button" onclick="ButtonModificar_Click" />
                             <asp:Button
                                 ID="ButtonEliminar" runat="server" Text="Eliminar" CssClass="button" 
                             onclick="ButtonEliminar_Click" />
                     </p>
                     <p>
                         &nbsp;<asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                   <p><asp:Label runat="server" ID="notificacion" Visible="False"></asp:Label>
                         <asp:Button ID="ButtonSi" runat="server" Text="Si" Visible="False" 
                                CssClass="button" onclick="ButtonSi_Click" />
                            <asp:Button ID="ButtonNo" runat="server" Text="No" CssClass="button" 
                                onclick="ButtonNo_Click" Visible="False" />
                   </p>
                               
                          </ContentTemplate>
                          <Triggers>
                                             <asp:AsyncPostBackTrigger ControlID="ButtonEliminar" 
                                                 EventName="Click" />
                          </Triggers>
        </asp:UpdatePanel>
                        
                         
                         <table width="100%" border="0" >
                             <tr>
                                 <td width="11%">
                                     
                               <div align="left" style="height: 17px; width: 70px">Nombre (*)</div></td>
                                 <td colspan="3">
                                     <asp:TextBox ID="TextBoxNombreEdit" runat="server" MaxLength="50" Width="100%"></asp:TextBox>
                                      <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                         ControlToValidate="TextBoxNombreEdit" Display="Dynamic" 
                                         ErrorMessage="Este campo es obligatorio"></asp:RequiredFieldValidator>
                                     <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                                         ControlToValidate="TextBoxNombreEdit" ErrorMessage="Caracteres no validos" 
                                         ValidationExpression="[a-zA-Z_0-9áéíóúÁÉÍÓÚ .]+" Display="Dynamic"></asp:RegularExpressionValidator>                                 </td>
                             </tr>
                             <tr>
                                <td>
                                     
                                         <div align="left" style="height: 18px; width: 62px">NIT (*)</div>                                                                    </td>
                                 <td width="33%">
                               <asp:TextBox ID="TextBoxNit" runat="server" Enabled="false" MaxLength="20" 
                                         Width="100%"></asp:TextBox>                                 </td>
                             </tr>
                             <tr>
                                 <td>
                                     
                               <div align="left" style="width: 73px">Teléfono (*)</div></td>
                                 <td>
                                     <asp:TextBox ID="TextBoxTelefono" runat="server" Width="91px"></asp:TextBox>
                                     &nbsp;Ext.
                                     <asp:TextBox ID="TextBoxExtension" runat="server" Width="38px"></asp:TextBox>
                                     &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                         ControlToValidate="TextBoxTelefono" Display="Dynamic" 
                                         ErrorMessage="Este campo es obligatorio"></asp:RequiredFieldValidator>
                                     <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                         ControlToValidate="TextBoxTelefono" Display="Dynamic" 
                                         ErrorMessage="Solo se admiten números" ValidationExpression="[0-9]+"></asp:RegularExpressionValidator>                                 </td>
                                 <td width="15%">
                                     <div align="right">
                                         <div align="left">E-mail (*)</div>
                               </div>                                 </td>
                                 <td width="41%"><asp:TextBox ID="TextBoxEmail" runat="server" Width="100%"></asp:TextBox>
                                   <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                                         ControlToValidate="TextBoxEmail" Display="Dynamic" 
                                         ErrorMessage="Este campo es obligatorio"></asp:RequiredFieldValidator>
                                   <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                         ControlToValidate="TextBoxEmail" Display="Dynamic" 
                                         ErrorMessage="Correo Electrónico no valido" 
                                         ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                                     <br />                                 </td>
                             </tr>
                             <tr>
                                 <td>
                                     
                               <div align="left" style="width: 78px">Página web</div></td>
                                 <td>
                                     <asp:TextBox ID="TextBoxPagWeb" runat="server" MaxLength="45" Width="100%"></asp:TextBox>                                 </td>
                                 <td>
                                     <div align="right">
                                         <div align="left">Sector Empresarial (*)</div>
                                 </div>                                 </td>
                                 <td>
                                     <asp:DropDownList ID="DropDownListSectorEmp" runat="server" Width="100%">                                     </asp:DropDownList>                                 </td>
                             </tr>
                             <tr>
                                 <td>
                                     
                               <div align="left" style="width: 80px">Departamento</div></td>
                                 <td>
                                     <asp:DropDownList ID="DropDownListDpto" runat="server" AutoPostBack="true" 
                                         onselectedindexchanged="DropDownListDpto_SelectedIndexChanged1" 
                                         Width="100%">                                     </asp:DropDownList>                                 </td>
                                 <td>
                                     <div align="right" style="width: 86px">
                                         <div align="left">Municipio</div>
                                 </div>                                 </td>
                                 <td>
                                     <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                         <ContentTemplate>
                                             <asp:DropDownList ID="DropDownListMunicipios" runat="server" Width="100%">                                             </asp:DropDownList>
                                         </ContentTemplate>
                                         <Triggers>
                                             <asp:AsyncPostBackTrigger ControlID="DropDownListDpto" 
                                                 EventName="SelectedIndexChanged" />
                                         </Triggers>
                                     </asp:UpdatePanel>                                 </td>
                             </tr>
                             <tr>
                                 <td>
                                     
                               <div align="left" style="width: 59px">Dirección</div></td>
                                 <td colspan="3">
                                     <asp:TextBox ID="TextBoxDireccion" runat="server" MaxLength="45" Width="100%"></asp:TextBox>                                 </td>
                             </tr>
                             <tr>
                                 <td>
                                     <div align="right" style="width: 92px">
                                         <div align="left">Nombre de Usuario (*)</div>
                                     </div>                               </td>
                                 <td>
                                     <asp:TextBox ID="TextBoxNomUsuario" runat="server" MaxLength="20" Width="100%"></asp:TextBox>                                                           </td>
                             </tr>
                             <tr>
                                 <td>
                                     
                               <div align="left" style="width: 84px">Contraseña (*)</div></td>
                                 <td>
                                     <asp:TextBox ID="TextBoxContrasena" runat="server" MaxLength="20" 
                                         TextMode="Password" Width="100%"></asp:TextBox>
                                     <asp:CompareValidator ID="CompareValidator1" runat="server" 
                                         ControlToCompare="TextBoxContrasena" ControlToValidate="TextBoxContrasena2" 
                                         Display="Dynamic" ErrorMessage="Las contraseñas no coinciden"></asp:CompareValidator>                                 </td>
                                 <td>
                                     <div align="right">
                                         <div align="left">Repita su contraseña (*)</div>
                                 </div>                                 </td>
                                 <td>
                                     <asp:TextBox ID="TextBoxContrasena2" runat="server" MaxLength="20" 
                                         TextMode="Password" Width="100%"></asp:TextBox>
                                     <asp:CompareValidator ID="CompareValidator2" runat="server" 
                                         ControlToCompare="TextBoxContrasena" ControlToValidate="TextBoxContrasena2" 
                                         Display="Dynamic" ErrorMessage="Las contraseñas no coinciden"></asp:CompareValidator>                                 </td>
                             </tr>
                         </table>
<table border="0" width="100%">
                             <tr>
                                 <td>
                                     <b>Nota: Deje en blanco los campos de contraseña para conservar la actual.</b></td>
                                 <td>
                                     <asp:Button ID="ButtonRegistrar" runat="server" CssClass="button" Height="30px" 
                                         onclick="ButtonRegistrar_Click" Text="Guardar" Width="93px" />
                                 </td>
                             </tr>
                         </table>
                                        
                        </div> 
                        
        </asp:Panel>
        </form>


</asp:Content>

